/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * glwohnzimmerdeluxe
 * Copyright (C) Burim Kameri 2008 <futureburim@web.de>
 * 
 * glwohnzimmerdeluxe is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * glwohnzimmerdeluxe is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef UTILS_H_
#define UTILS_H_

#include <iostream>
#include <SDL/SDL.h>

using namespace std;

class Utils
{
public:
	static int long GET_ELAPSED_TIME()
	{
		Utils::diffMilliseconds = (SDL_GetTicks() - Utils::lastMilliseconds);
		Utils::lastMilliseconds = SDL_GetTicks ();
		return Utils::diffMilliseconds;
	}	
		
	static void PRINT_ELAPSED_TIME( string str, long min )
	{
		Utils::diffMilliseconds = (SDL_GetTicks() - Utils::lastMilliseconds);
		if( diffMilliseconds >= min )
			cout <<str<<diffMilliseconds<<endl;
		Utils::lastMilliseconds = SDL_GetTicks ();
	}				

protected:

private:	
	static long lastMilliseconds;
	static long diffMilliseconds;
};



#endif // UTILS_H_
